package data.model;

import java.util.HashMap;
import java.util.Map;

/**
 * \* Created fank
 * \* Date: 2018/5/28
 * \* Time: 11:39
 * \* @desc:
 */
public enum PropType {
    ZHUANSHI(1), GOLD(2), QUAN_DUOBAO(3), QUAN_QB_COMEIN(4), QUAN_HUAFEI_COMEIN(5), QUAN_HUAFEI_DUIHUAN(6), QUAN_QB_DUIHUAN(7), BUQIANKA(8), XIAOLABA(
            9);
    private int nCode;

    private PropType(int _nCode) {
        this.nCode = _nCode;
    }
    private static Map<Integer, PropType> index2Type = new HashMap<>();
    static {
        for (PropType propType : PropType.values()) {
            index2Type.put(propType.getValue(), propType);
        }
    }
    public Integer getValue() {
        return Integer.valueOf(this.nCode);
    }
    public static  PropType valueOf(int index){
        return index2Type.get(index);
    }
}
